package vn.elca.training.important_classes_excercise.Question11;


public class Book  implements Comparable<Book>{
	private String m_name;
	private int m_price;
	private String m_author;
	private int m_quantity;

	public Book(String m_name, int m_price, String m_author,
			int m_quantity) {
		super();
		this.m_name = m_name;
		this.m_price = m_price;
		this.m_author = m_author;
		this.m_quantity = m_quantity;
	}
	public int compareTo(Book o) {
		return this.m_price - o.m_price;
	}
	public String toString() {
		return "[" + m_name + ";" + m_author + ";" + m_price + ";" + m_quantity
				+ "]";
	}
	public String getM_name() {
		return m_name;
	}

	public void setM_name(String m_name) {
		this.m_name = m_name;
	}

	public int getM_price() {
		return m_price;
	}

	public void setM_price(int m_price) {
		this.m_price = m_price;
	}

	public String getM_author() {
		return m_author;
	}

	public void setM_author(String m_author) {
		this.m_author = m_author;
	}

	public int getM_quantity() {
		return m_quantity;
	}

	public void setM_quantity(int m_quantity) {
		this.m_quantity = m_quantity;
	}	

}
